package com.tedu.egvehicle.controller;

import com.tedu.egvehicle.base.response.JsonResult;
import com.tedu.egvehicle.mapper.NoticeMapper;
import com.tedu.egvehicle.pojo.vo.NoticeListVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/notice")
@Tag(name = "公告")
public class NoticeController {
    @Autowired
    private NoticeMapper noticeMapper;
    @GetMapping("/list")
    public JsonResult select(){
        List<NoticeListVO> list = noticeMapper.select();
        return JsonResult.success(list);
    }
}
